
export default function (color:any,data:any){
    switch (color) {
        case "亮色"         :
        case "bright"       :   return `\x1B[1m${data}\x1B[0m`;

        case "灰色"         : 
        case "grey"         :   return  `\x1B[2m${data}\x1B[0m`;

        case "斜体"         :
        case "italic"       :   return `\x1B[3m${data}\x1B[0m`;

        case "下划线"       :
        case "underline"    :   return `\x1B[4m${data}\x1B[0m`;

        case "反向"         :
        case "reverse"      :   return `\x1B[7m${data}\x1B[0m`;

        case "隐藏"         :
        case "hidden"       :   return `\x1B[8m${data}\x1B[0m`;

        case "黑色"         :
        case "black"        :   return `\x1B[30m${data}\x1B[0m`;
    
        case "红色"         :
        case "red"          :   return `\x1B[31m${data}\x1B[0m`;
    
        case "绿色"         :
        case "green"        :   return `\x1B[32m${data}\x1B[0m`;

        case "黄色"         :
        case "yellow"       :   return `\x1B[33m${data}\x1B[0m`;

        case "蓝色"         :
        case "blue"         :   return `\x1B[34m${data}\x1B[0m`;

        case "品红"         :
        case "magenta"      :   return `\x1B[35m${data}\x1B[0m`;

        case "青色"         :
        case "cyan"         :   return `\x1B[36m${data}\x1B[0m`;

        case "白色"         :
        case "white"        :   return `\x1B[37m${data}\x1B[0m`;

        case "背景色为黑色"  :
        case "blackBG"      :   return `\x1B[40m${data}\x1B[0m`;

        case "背景色为红色"  :
        case "redBG"        :   return `\x1B[41m${data}\x1B[0m`;

        case "背景色为绿色"  :
        case "greenBG"      :   return `\x1B[42m${data}\x1B[0m`;

        case "背景色为黄色"  :
        case "yellowBG"     :   return `\x1B[43m${data}\x1B[0m`;

        case "背景色为蓝色"  :
        case "blueBG"       :   return `\x1B[44m${data}\x1B[0m`;

        case "背景色为品红"  :
        case "magentaBG"    :   return `\x1B[45m${data}\x1B[0m`;

        case "背景色为青色"  :
        case "cyanBG"       :   return `\x1B[46m${data}\x1B[0m`;

        case "背景色为白色"  :
        case "whiteBG"      :   return `\x1B[47m${data}\x1B[0m`;
    }
    return data;
}